package com.example.b.service;

import com.example.b.dao.DepartmentMapper;
import io.seata.rm.tcc.api.BusinessActionContext;
import io.seata.rm.tcc.api.BusinessActionContextParameter;
import io.seata.rm.tcc.api.LocalTCC;
import io.seata.rm.tcc.api.TwoPhaseBusinessAction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

@LocalTCC
public interface IDeleteDepartment {

    @TwoPhaseBusinessAction(name = "delete", commitMethod = "deleteConfirm", rollbackMethod = "deleteCancel")
    public void delete(@BusinessActionContextParameter(paramName = "id") Long id);

    public boolean deleteConfirm(BusinessActionContext context);

    public boolean deleteCancel(BusinessActionContext context);
}



